<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h1>这是我的标题</h1>
    <img src='https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png' alt="">
    <button onclick="sendMsg">按钮</button>
    <script>
        function changeTitle () {
            document.querySelector('h1').innerText = '原神启动'
        }

        function sendMsg(){
            <!-- 注入对象的名称.注入对象的属性       -->
            objName.objKey()
        }
    </script>
</body>
</html>